<!-- INCLUDE overall_header.html -->
<!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
<!-- IF U_MCP --><p>[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ENDIF -->
<h2><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2>

<!-- IF FORUM_DESC or MODERATORS or U_MCP -->
<p>
	<!-- NOTE: remove the style="display: none" when you want to have the forum description on the forum body -->
	<!-- IF FORUM_DESC --><span style="display: none">{FORUM_DESC}<br /></span><!-- ENDIF -->
	<!-- IF MODERATORS --><strong><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->:</strong> {MODERATORS}<!-- ENDIF -->
</p>
<!-- ENDIF -->

<!-- IF S_FORUM_RULES -->
	<div class="rules">
		<div class="inner"><span class="corners-top"><span></span></span>

		<!-- IF U_FORUM_RULES -->
			<a href="{U_FORUM_RULES}">{L_FORUM_RULES}</a>
		<!-- ELSE -->
			<strong>{L_FORUM_RULES}</strong><br />
			{FORUM_RULES}
		<!-- ENDIF -->

		<span class="corners-bottom"><span></span></span></div>
	</div>
<!-- ENDIF -->

<!-- IF S_HAS_SUBFORUM -->

	<!-- INCLUDE forumlist_body.html -->
<!-- ENDIF -->

<!-- IF S_IS_LOCKED -->
	<div class="topic-actions" <!-- IF S_HAS_SUBFORUM -->style="margin-top: 2em;"<!-- ENDIF -->>

	<!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO -->
		<div class="buttons">
			<div class="locked-icon"><a href="{U_POST_NEW_TOPIC}" title="{L_FORUM_LOCKED}"><span></span>{L_FORUM_LOCKED}</a></div>
		</div>
	<!-- ENDIF -->
	</div>
<!-- ENDIF -->

<!-- IF S_NO_READ_ACCESS -->

	<div class="panel">
		<div class="inner"><span class="corners-top"><span></span></span>
		<strong>{L_NO_READ_ACCESS}</strong>
		<span class="corners-bottom"><span></span></span></div>
	</div>

	<!-- IF not S_USER_LOGGED_IN -->

		<form action="{S_LOGIN_ACTION}" method="post">

		<div class="panel">
			<div class="inner"><span class="corners-top"><span></span></span>

			<div class="content">
				<h3><a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a><!-- IF S_REGISTER_ENABLED -->&nbsp; &bull; &nbsp;<a href="{U_REGISTER}">{L_REGISTER}</a><!-- ENDIF --></h3>

				<fieldset class="fields1">
				<dl>
					<dt><label for="username">{L_USERNAME}:</label></dt>
					<dd><input type="text" tabindex="1" name="username" id="username" size="25" value="{USERNAME}" class="inputbox autowidth" /></dd>
				</dl>
				<dl>
					<dt><label for="password">{L_PASSWORD}:</label></dt>
					<dd><input type="password" tabindex="2" id="password" name="password" size="25" class="inputbox autowidth" /></dd>
					<!-- IF S_AUTOLOGIN_ENABLED --><dd><label for="autologin"><input type="checkbox" name="autologin" id="autologin" tabindex="3" /> {L_LOG_ME_IN}</label></dd><!-- ENDIF -->
					<dd><label for="viewonline"><input type="checkbox" name="viewonline" id="viewonline" tabindex="4" /> {L_HIDE_ME}</label></dd>
				</dl>
				<dl>
					<dt>&nbsp;</dt>
					<dd><input type="submit" name="login" tabindex="5" value="{L_LOGIN}" class="button1" /></dd>
				</dl>
				</fieldset>
			</div>

			<span class="corners-bottom"><span></span></span></div>
		</div>

		</form>

	<!-- ENDIF -->

<!-- ENDIF -->

<!-- BEGIN topicrow -->

	<!-- IF not topicrow.S_TOPIC_TYPE_SWITCH and not topicrow.S_FIRST_ROW -->
		</ul>
		<span class="corners-bottom"><span></span></span></div>
	</div>
	<!-- ENDIF -->

<!-- BEGINELSE -->
<a name="chat"></a>
	<!-- IF topicrow.S_FIRST_ROW or not topicrow.S_TOPIC_TYPE_SWITCH -->
	<div class="forumbg">
		<div class="inner"><span class="corners-top"><span></span></span>
		<ul class="topiclist">
			<li class="header">
				<dl class="icon">
					<dd style="width:100%;">&nbsp;<div style="float:left;"><a href="{U_CHAT_LINK}"><!-- IF S_CHAT_NOTIN -->{L_CHAT_ENTER}<!-- ELSE -->{L_CHAT_EXIT}<!-- ENDIF --></a></div><div style="float:right;" id="clock"></div>&nbsp;</dd>
				</dl>
			</li>
		</ul>
		<ul class="topiclist topics">
	<!-- ENDIF -->

		<li class="row<!-- IF topicrow.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
			<dl class="icon">
				<dd class="lastpost" style="width:100%">
		<!-- IF S_IS_POSTABLE -->
<!-- IF not S_CHAT_NOTIN -->
	<!-- IF S_BBCODE_ENABLED -->
	<script src="{PPKBB3CKER_ADDONS}js/editor.js" type="text/javascript"></script>
	<script src="{PPKBB3CKER_ADDONS}js/bbcode.js" type="text/javascript"></script>
	<!-- ENDIF -->
	<!-- IF ARCH_OPT -->
	<script src="{PPKBB3CKER_ADDONS}js/jquery.toajax.js" type="text/javascript"></script>
	<!-- ENDIF -->
	<script type="text/javascript">
	// <![CDATA[
		function start_clock()
		{
			var tick;
			var ut=new Date();
			var h,m,s;
			var time="";
			h=ut.getHours();
			m=ut.getMinutes();
			s=ut.getSeconds();
			if(s<=9) s="0"+s;
			if(m<=9) m="0"+m;
			if(h<=9) h="0"+h;
			time+=h+":"+m+":"+s;
			document.getElementById('clock').innerHTML=time;
			tick=setTimeout("start_clock()",1000);
		}

	<!-- IF S_BBCODE_ENABLED -->
		var form_name = 'text';
		var text_name = 'message';
		var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[s]','[/s]','[samp]','[/samp]','[color=]','[/color]','[size=]','[/size]','[url]','[/url]','[url=]','[/url]','[q]','[/q]','[blockquote]','[/blockquote]','[pre]','[/pre]','[code]','[/code]','[noparse]','[/noparse]'<!-- IF S_BBCODE_IMG -->,'[img=]','[/img]'<!-- ENDIF -->);
	<!-- ENDIF -->
	 jQuery(document).ready(
		function($)
		{
			start_clock();

			handle_send("read", 0);
			<!-- IF ARCH_OPT -->
			$("#varch").toAJAX();
			<!-- ENDIF -->
			var s = {CHAT_HSTEP};
			var sMax={CHAT_HMAX};
			var sMin={CHAT_HMIN};
			ch=getCookie('chatHeight');
			if(!isNaN(ch) && (ch >= sMin && ch <= sMax))
			{
				$(window).load(function () {
					$(".smilies").animate({
						height: ch
						}, 0);
					$(".shouts").animate({
						height: ch
						}, 0);
				      $(".users").animate({
						height: ch
						}, 0);
				      $(".chat_window").animate({
						height: ch
						}, 0);
				});
			}
			oh=$('.users').height();
			$(".chat_mheight").click(function () {
				h=$('.users').height();
				if(h-s > sMin)
				{
					setCookie('chatHeight', h-s, 7);
					$('.users').css('height', h-s);
					$('.shouts').css('height', h-s);
					$('.smilies').css('height', h-s);
					$('.chat_window').css('height', h-s);
				}
			});
			$(".chat_pheight").click(function () {
				h=$('.users').height();
				if(h+s < sMax)
				{
					setCookie('chatHeight', h+s, 7);
					$('.users').css('height', h+s);
					$('.shouts').css('height', h+s);
					$('.smilies').css('height', h+s);
					$('.chat_window').css('height', h+s);
				}
			});
			$(".chat_height").click(function () {
				setCookie('chatHeight', oh, 7);
				$('.users').css('height', oh);
				$('.shouts').css('height', oh);
				$('.smilies').css('height', oh);
				$('.chat_window').css('height', oh);
			});
		}
	);

	function getCookie(name)
	{
		var start = document.cookie.indexOf( name + "=" );
		var len = start + name.length + 1;
		if ((!start) && (name != document.cookie.substring( 0, name.length)))
		{
			return null;
		}
		if (start == -1) return null;
		var end = document.cookie.indexOf(';', len);
		if (end == -1) end = document.cookie.length;
		return unescape(document.cookie.substring(len, end));
	}

	function setCookie (name, value, expires, path, domain, secure)
	{
		var today = new Date();
		today.setTime(today.getTime());
		if (expires)
		{
			expires = expires * 1000 * 60 * 60 * 24;
		}
		var expires_date = new Date( today.getTime() + (expires));
		document.cookie = name+'='+escape( value ) +
		((expires) ? ';expires='+expires_date.toGMTString() : '' ) + //expires.toGMTString()
		((path) ? ';path=' + path : '' ) +
		((domain) ? ';domain=' + domain : '' ) +
		((secure) ? ';secure' : '' );
	}

	function deleteCookie (name, path, domain)
	{
		if (getCookie(name)) document.cookie = name + '=' +
		((path) ? ';path=' + path : '') +
		((domain) ? ';domain=' + domain : '' ) +
		';expires=Thu, 01-Jan-1970 00:00:01 GMT';
	}

	var fieldname = 'chat_window';
	var last_time = {TIME};
	var xmlHttp = http_object();
	var last_id = {LAST_ID};
	var type = 'receive';
	var post_time = {TIME};
	var read_interval = {REFRESH};
	var interval = setInterval('handle_send("read", last_id);', read_interval);

	function handle_send(mode, f)
	{
		if(document.text.message.value=='' && (mode != 'read' && mode != 'delete' && mode != 'get_gmode' && mode != 'set_hidden' && mode != 'acomm'))
		{
			return false;
		}
		<!-- IF CHATPM_OPT -->
		if(mode=='add' && document.text.to_user_id.value!=0 && !document.getElementById('u'+document.text.to_user_id.value))
		{
			document.text.to_user.value = '';
			document.text.to_user_id.value = 0;
			document.getElementById('to_user').style.display = 'none';
			/*if(!confirm('{L_CHAT_PMUSER_EXITED}'))
			{*/
				document.text.message.value = '';
				return false;
			//}
		}
		<!-- ENDIF -->
		if (xmlHttp.readyState == 4 || xmlHttp.readyState == 0)
		{
			indicator_switch('on');
			type = 'receive';
			param = 'mode=' + mode;
			//param += '&last_id=' + last_id;
			//param += '&last_time=' + last_time;
			//param += '&last_post=' + post_time;
			//param += '&read_interval=' + read_interval;
			<!-- IF GMODE_OPT -->
			param += '&get_gmode='+document.text.u_gmode.checked;
			param += '&to_room='+document.text.to_room.value;
			<!-- ENDIF -->
			<!-- IF CHATPM_OPT -->
			param += '&to_user='+document.text.to_user.value;
			param += '&to_user_id='+document.text.to_user_id.value;
			<!-- ENDIF -->

			if (mode == 'add' && document.text.message.value != '')
			{
				type = 'send';
				for(var i = 0; i < f.elements.length; i++)
				{
					elem = f.elements[i];
					param += '&' + elem.name + '=' + encodeURIComponent(elem.value);
				}
				document.text.message.value = '';
			}
			else if (mode == 'delete')
			{
				type = 'delete';
				param += '&del_mess=' + f;
			}
			<!-- IF HIDDEN_OPT -->
			else if (mode == 'set_hidden')
			{
				type = 'set_hidden';
				param += '&set_hidden=' + f;
			}
			<!-- ENDIF -->
			<!-- IF ACOMMANDS_OPT -->
			else if (mode == 'acomm')
			{
				type = 'acomm';
				param += '&acomm=' + f;
			}
			<!-- ENDIF -->
			<!-- IF IN_CHAT -->document.text.message.focus();<!-- ENDIF -->
			xmlHttp.open("POST", '{FILENAME}', true);
			xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
			xmlHttp.onreadystatechange = handle_return;
			xmlHttp.send(param);
		}
	}

	function handle_return()
	{
		if (xmlHttp.readyState == 4)
		{
			if (type != 'delete')
			{
				results = xmlHttp.responseText.split('---');
				//if (results[0])
				//{
					//if (last_id == 0)
					//{
						<!-- IF S_BBCODE_ENABLED -->
						var messages=results[0].split("</div>");
						for(i=0;i<messages.length;i++)
						{
							messages[i]=parseBBCode(messages[i]);
						}
						document.getElementById(fieldname).innerHTML = messages.join('</div>');
						<!-- ELSE -->
						document.getElementById(fieldname).innerHTML = results[0];
						<!-- ENDIF -->
					//}
					//else
					//{
						//document.getElementById(fieldname).innerHTML = results[0] + document.getElementById(fieldname).innerHTML;
					//}
					//last_id = results[1];
					//if (results[2])
					//{
						document.getElementById('users').innerHTML = results[2];
						//last_time = results[3];
					//}
					/*if (results[4] != read_interval)
					{
						window.clearInterval(interval);
						read_interval = results[4];
						interval = setInterval('handle_send("read", last_id);', read_interval);
						//document.getElementById('update_seconds').innerHTML = results[4];
					}*/
					if(results[5]!=0)
					{
						killtime(results[5]);
					}
				//}
			}
			indicator_switch('off');
		}
	}

	function delete_post(chatid)
	{
		if(confirm('{L_CHAT_DELMESS}'))
		{
			document.getElementById('p' + chatid).style.display = 'none';
			handle_send('delete', chatid);
		}
	}
	<!-- IF HIDDEN_OPT -->
	function set_hidden()
	{
		/*if(document.getElementById("hid_indicator"))
		{
			var img = document.getElementById("hid_indicator");
			if(img.style.visibility == "hidden")
			{
				img.style.visibility = "visible";
			}
			else
			{
				img.style.visibility = "hidden";
			}
		}*/

		handle_send('set_hidden', document.text.u_hidden.checked);
	}
	<!-- ENDIF -->
	<!-- IF GMODE_OPT -->
	function get_gmode()
	{
		if(document.getElementById("to_room"))
		{
			//var img = document.getElementById("gmode_indicator");
			if(document.getElementById('to_room').style.display=='none')
			{
				document.getElementById('to_room').style.display = '';
				//img.style.visibility = "visible";
			}
			else
			{
				document.text.to_room.value = '';
				document.getElementById('to_room').style.display = 'none';
				//img.style.visibility = "hidden";
			}
		}

		handle_send('get_gmode', document.text.u_gmode.checked);
	}
	function insertroom(room)
	{
		if(room!=0 && room!='')
		{
			document.text.to_room.value = room;
		}
		else
		{
			document.text.to_room.value = '';
		}
		document.text.message.focus();
	}
	<!-- ENDIF -->
	<!-- IF ACOMMANDS_OPT -->
	function aopts(uid, aid, ban_type)
	{
		if(uid!=aid)
		{
			document.getElementById('aopts'+uid).innerHTML = (ban_type=='ban' ? '<a href="javascript:void(0);" onClick="javascript:userkick('+uid+');" title="{L_CHAT_KICKHLP}"><img src="{ROOT_PATH}chat/images/status_unknown.png" alt="{L_CHAT_KICK}" /></a> <a href="javascript:void(0);" onClick="javascript:userban('+uid+');" title="{L_CHAT_BANHLP}"><img src="{ROOT_PATH}chat/images/messagebox_critical.png" alt="{L_CHAT_BAN}" /></a> <a href="javascript:void(0);" onClick="javascript:userquickban('+uid+');" title="{L_CHAT_QUICKBANHLP}"><img src="{ROOT_PATH}chat/images/agt_action_fail1.png" alt="{L_CHAT_QUICKBAN}" /></a>' : ' <a href="javascript:void(0);" onClick="javascript:userunban('+uid+');" title="{L_CHAT_UNBANHLP}"><img src="{ROOT_PATH}chat/images/agt_action_success.png" alt="{L_CHAT_UNBAN}" /></a>');
		}
	}
	function userkick(uid)
	{
		if(confirm('{L_CHAT_UKICK}'))
		{
			handle_send('acomm', '/k ' + uid);
		}
	}
	function uclean()
	{
		if(confirm('{L_CHAT_DELETE_USERS}'))
		{
			handle_send('acomm', '/u');
		}
	}
	function mclean(uid)
	{
		if(confirm('{L_CHAT_DELETE_MESS}'))
		{
			handle_send('acomm', '/m');
		}
	}
	function aclean(uid)
	{
		if(confirm('{L_CHAT_DELETE_AMESS}'))
		{
			handle_send('acomm', '/r');
		}
	}
	function userunban(uid)
	{
		if(confirm('{L_CHAT_UUNBAN}'))
		{
			if(document.text.to_user_id.value==uid)
			{
				document.text.to_user_id.value=0;
				document.getElementById('to_user').style.display = 'none';
			}
			handle_send('acomm', '/a ' + uid);
		}
	}
	function userquickban(uid)
	{
		if(confirm('{L_UBAN_CONFIRM} {QBAN_TIME} {L_UBAN_CONFIRM2}'))
		{
			if(document.text.to_user_id.value==uid)
			{
				document.text.to_user_id.value=0;
				document.getElementById('to_user').style.display = 'none';
			}
			handle_send('acomm', '/q ' + uid);
		}
	}
	function userban(uid)
	{
		var ban_time = eval(prompt("{L_UBAN_TIME}:", 0))
		if(ban_time)
		{
			if(confirm('{L_UBAN_CONFIRM} '+ban_time+ ' {L_UBAN_CONFIRM2}'))
			{
				handle_send('acomm', '/b ' + uid + ' ' + ban_time);
			}
		}
	}
	<!-- ENDIF -->
	function indicator_switch(mode)
	{
		if(document.getElementById("act_indicator"))
		{
			var img = document.getElementById("act_indicator");
			if(img.style.visibility == "hidden" && mode == 'on')
			{
				img.style.visibility = "visible";
			}
			else if (mode == 'off')
			{
				img.style.visibility = "hidden";
			}
		}
	}

	function http_object()
	{
		if (window.XMLHttpRequest)
		{
			return new XMLHttpRequest();
		}
		else if(window.ActiveXObject)
		{
			return new ActiveXObject("Microsoft.XMLHTTP");
		}
		else
		{
			document.getElementById('chat_window').innerHTML = 'Status: Cound not create XmlHttpRequest Object.  Consider upgrading your browser.';
		}
	}
	<!-- IF CHATPM_OPT -->
	function insertuname(uname, uid)
	{
		if(uname!='' && uid!=0 && uid!={USER_ID})
		{
			if(document.text.to_user_id.value!=uid)
			{
				document.text.to_user.value = uname;
				document.text.to_user_id.value = uid;
				//document.getElementById('u'+uid).style.textDecoration ='underline';
				document.getElementById('to_user').style.display = '';
			}
			else
			{
				document.text.to_user.value = '';
				document.text.to_user_id.value = 0;
				//document.getElementById('u'+uid).style.textDecoration ='none';
				document.getElementById('to_user').style.display = 'none';
			}
		}
		else
		{
			document.text.to_user.value = '';
			document.text.to_user_id.value = 0;
			//document.getElementById('u'+uid).style.textDecoration ='none';
			document.getElementById('to_user').style.display = 'none';
		}
		document.text.message.focus();
	}
	<!-- ENDIF -->
	function inserttext(str)
	{
		if(str!='')
		{
			document.text.message.value += str;
		}
		else
		{
			document.text.message.value = '';
		}
		document.text.message.focus();
	}
	function fulltime()
	{
		document.text.submit.disabled=true;
		if(document.text.submit.value > 0)
		{
			document.text.submit.value-=1;
		}
		else if(document.text.submit.value == 0)
		{
			document.text.submit.value = '{L_CHAT_SEND}';
			document.text.submit.disabled=false;
			document.text.message.focus();
			return;
		}
		else
		{
			document.text.submit.value = {WAITTIME};
		}

		setTimeout('fulltime()', 1000);
	}

	function killtime(r)
	{
		if(r)
		{
			document.location.href='./viewchat.{PHPEX}?f={FORUM_ID}&chat=exit&r='+r;
		}
	}
	// ]]>
	</script>
<!-- ENDIF -->
	<link rel="stylesheet" href="{ROOT_PATH}chat/css/stylesheet_chat.css" type="text/css" />
		<table width="100%" cellspacing="1">
		<tr align="center" class="bg2"<!-- IF not S_FORM_WINDOW --> style="display:none;"<!-- ENDIF -->>
			<td colspan="3" height="25">
				<form name="text" id="text" method="post" action="javascript:void(0);" onsubmit="handle_send('add', this);{FULLTIME}" autocomplete="off">
				<strong style="color:#000000;">{L_MESSAGE}: </strong><!-- IF CHATPM_OPT --><input type="text" maxlength="64" tabindex="2" name="to_user" id="to_user" size="10" style="display:none;" /> <!-- ENDIF --><input type="text" maxlength="255" tabindex="1" name="message" id="message" class="inputbox chatinput" />&nbsp;<img alt="" src="{ROOT_PATH}chat/images/act_indicator.gif" id="act_indicator" />&nbsp;
				<input type="submit" class="button1" value="{L_CHAT_SEND}" name="submit" tabindex="6" accesskey="s"/><input class="button1" type="reset" value="{L_CHAT_RESET}" /><!-- IF HIDDEN_OPT -->&nbsp;<img style="width:16px;height:16px;vertical-align:middle;" id="hid_indicator" src="{ROOT_PATH}chat/images/overview.png" alt="" /> {HIDDEN_OPT}<!-- ENDIF --><!-- IF GMODE_OPT -->&nbsp;<img style="width:16px;height:16px;vertical-align:middle;visibility:display;" id="gmode_indicator" src="{ROOT_PATH}chat/images/14_layer_visible.png" alt="" /> {GMODE_OPT} <input title="{L_CHAT_GMODEIDHLP}" type="text" maxlength="5" tabindex="3" name="to_room" id="to_room" size="3" style="display:none;" /><!-- ENDIF --><br />
				<!-- IF CHATPM_OPT --><input type="hidden" name="to_user_id" value="0" /><!-- ENDIF -->
				<!-- IF ACOMMANDS_OPT --><input type="hidden" name="acomm" value="" /><!-- ENDIF -->
				</form>
			</td>
		</tr>
		<!-- IF S_BBCODE_WINDOW -->
		<tr>
			<td class="bg1" colspan="3" height="25" align="center">
				<input type="button" class="button2" name="addbbcode0" value=" B " style="font-weight:bold;" onclick="bbstyle(0)" title="{L_BBCHAT_B}" />
				<input type="button" class="button2" name="addbbcode2" value=" i " style="font-style:italic;" onclick="bbstyle(2)" title="{L_BBCHAT_I}" />
				<input type="button" class="button2" name="addbbcode4" value=" u " style="text-decoration: underline;" onclick="bbstyle(4)" title="{L_BBCHAT_U}" />
				<input type="button" class="button2" name="addbbcode6" value=" s " style="text-decoration: line-through;" onclick="bbstyle(6)" title="{L_BBCHAT_S}" />
				<input type="button" class="button2" name="addbbcode8" value=" samp " onclick="bbstyle(8)" title="{L_BBCHAT_SAMP}" />
				<input type="button" class="button2" name="addbbcode10" value=" color= " onclick="bbstyle(10)" title="{L_BBCHAT_COLOR}" />
				<input type="button" class="button2" name="addbbcode12" value=" size= " onclick="bbstyle(12)" title="{L_BBCHAT_SIZE}" />
				<input type="button" class="button2" name="addbbcode14" value=" url " onclick="bbstyle(14)" title="{L_BBCHAT_URL}" />
				<input type="button" class="button2" name="addbbcode16" value=" url= " onclick="bbstyle(16)" title="{L_BBCHAT_URL2}" />
				<input type="button" class="button2" name="addbbcode18" value=" q " onclick="bbstyle(18)" title="{L_BBCHAT_Q}" />
				<input type="button" class="button2" name="addbbcode20" value=" blockquote " onclick="bbstyle(20)" title="{L_BBCHAT_BLOCKQUOTE}" />
				<input type="button" class="button2" name="addbbcode22" value=" pre " onclick="bbstyle(22)" title="{L_BBCHAT_PRE}" />
				<input type="button" class="button2" name="addbbcode24" value=" code "onclick="bbstyle(24)" title="{L_BBCHAT_CODE}" />
				<input type="button" class="button2" name="addbbcode26" value=" noparse " onclick="bbstyle(26)" title="{L_BBCHAT_NOPARSE}" />
				<!-- IF S_BBCODE_IMG --><input type="button" class="button2" name="addbbcode28" value=" img= " onclick="bbstyle(28)" title="{L_BBCHAT_IMG}" /><!-- ENDIF -->
			</td>
		</tr>
		<!-- ENDIF -->
		<!-- IF S_MESSAGE_WINDOW or S_USER_WINDOW or S_BAR_WINDOW -->
		<tr class="bg1">
			<td style="width:10%;" valign="top">
				<!-- IF S_BAR_WINDOW -->
				<div class="smilies" id="smyles">{CHATSMILIES}</div>
				<!-- ENDIF -->
			</td>
			<td style="width:70%;" valign="top" id="td_shouts">
					<!-- IF S_MESSAGE_WINDOW -->
					<div class="shouts" id="shouts">
						<div id="chat_window"></div>
					</div>
					<!-- ENDIF -->
			</td>
			<td valign="top" style="width:20%;">
					<!-- IF S_USER_WINDOW -->
					<div class="users" id="users"></div>
					<!-- ENDIF -->
			</td>
		</tr>
		<!-- ENDIF -->
		<!-- IF S_CHAT_NOTIN -->
		<!-- <tr class="bg1">
			<td colspan="3" align="center" valign="middle" height="35">{L_CHAT_LOGIN}</td>
		</tr> -->
		<!-- ENDIF -->
		<!-- IF S_ONLINE_WINDOW -->
		<tr class="bg1">
			<td colspan="3" align="center" valign="middle" height="35">{ONLINE_MESSAGE}</td>
		</tr>
		<!-- ENDIF -->
		<tr class="bg1">
			<td colspan="3" align="center" valign="middle"><!-- IF ARCH_OPT -->{ARCH_OPT}<!-- ENDIF -->&nbsp;<!-- IF GMODE_OPT -->{ADM_OPT}<!-- ENDIF -->&nbsp;<!-- IF not S_CHAT_NOTIN -->{CHAT_TUPDATE}&nbsp;<b>{L_CHAT_HEIGHT}</b>: [<a title="{L_CHAT_PHEIGHT}" href="javascript:void(0);" class="chat_pheight">+</a> / <a title="{L_CHAT_MHEIGHT}" href="javascript:void(0);" class="chat_mheight">-</a> / <a title="{L_CHAT_OHEIGHT}" href="javascript:void(0);" class="chat_height">=</a>]<!-- ENDIF --></td>
		</tr>
		<!-- IF ARCH_OPT -->
		<tr class="bg2">
			<td colspan="3" align="center" valign="middle"><div id="chat_arch"></div></td>
		</tr>
		<!-- ENDIF -->
		</table>
		<!-- ENDIF -->
				</dd>
			</dl>
		</li>

			</ul>
		<span class="corners-bottom"><span></span></span></div>
	</div>

<!-- END topicrow -->

<!-- IF S_SELECT_SORT_DAYS and not S_DISPLAY_ACTIVE -->
	<form method="post" action="{S_FORUM_ACTION}">
		<fieldset class="display-options">
			<!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
			<!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
			<label>{L_DISPLAY_TOPICS}: {S_SELECT_SORT_DAYS}</label>
			<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label>
			<label>{S_SELECT_SORT_DIR} <input type="submit" name="sort" value="{L_GO}" class="button2" /></label>
		</fieldset>
	</form>
	<hr />
<!-- ENDIF -->

<!-- IF .topicrow and not S_DISPLAY_ACTIVE -->
	<div class="topic-actions">
		<!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO -->
		<div class="buttons">
			<div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->post-icon<!-- ENDIF -->" title="<!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF -->"><a href="{U_POST_NEW_TOPIC}"><span></span><!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF --></a></div>
		</div>
		<!-- ENDIF -->

		<!-- IF PAGINATION or TOTAL_POSTS or TOTAL_TOPICS -->
		<div class="pagination">
			<!-- IF TOTAL_TOPICS and not S_IS_BOT and U_MARK_TOPICS --><a href="{U_MARK_TOPICS}">{L_MARK_TOPICS_READ}</a> &bull;  <!-- ENDIF -->
			<!-- IF TOTAL_POSTS and not NEWEST_USER --> {TOTAL_POSTS}<!-- ELSEIF TOTAL_TOPICS and not NEWEST_USER --> {TOTAL_TOPICS}<!-- ENDIF -->
			<!-- IF TOTAL_USERS -->{TOTAL_USERS}<!-- ENDIF -->
			<!-- IF PAGINATION --> &bull;  <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a>
			 &bull;  <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF -->
		</div>
		<!-- ENDIF -->
	</div>
<!-- ENDIF -->

<!-- INCLUDE jumpbox.html -->

<!-- IF S_DISPLAY_ONLINE_LIST -->
	<h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3>
	<p>{LOGGED_IN_USER_LIST}</p>
<!-- ENDIF -->

<!-- IF S_DISPLAY_POST_INFO -->
	<h3>{L_FORUM_PERMISSIONS}</h3>
	<p><!-- BEGIN rules -->{rules.RULE}<br /><!-- END rules --></p>
<!-- ENDIF -->

<!-- INCLUDE overall_footer.html -->
